<template>
  <div>
    <el-button :="$attrs"></el-button>
  </div>
</template>

<script setup lang="ts">
// 引入useAttrs方法：获取组件标签身上属性与事件
import { useAttrs } from 'vue';
let $attrs = useAttrs()
console.log($attrs);


</script>
<style scoped lang="less">
</style>